package com.metier;

import java.io.Serializable;


/**
 * 
 * This is an object that contains data related to the utilisateur table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="utilisateur"
 */

public abstract class BaseAdmin extends com.metier.Utilisateur  implements Serializable {

	public static String REF = "Admin";
	public static String PROP_ID_USER = "IdUser";


	// constructors
	public BaseAdmin () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAdmin (java.lang.Integer idUser) {
		super(idUser);
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAdmin (
		com.metier.Etat fkEtat,
		java.util.Date dateinscription,
		java.lang.String nom,
		java.lang.String prenom,
		java.lang.String mdp,
		java.lang.String email,
		java.lang.String civilite,
		boolean changementnews,
		java.lang.Long nbreference,
		java.lang.String datenaissance) {

		super (
			fkEtat,
			dateinscription,
			nom,
			prenom,
			mdp,
			email,
			civilite,
			changementnews,
			nbreference,
			datenaissance);
	}



	private int hashCode = Integer.MIN_VALUE;








	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.metier.Admin)) return false;
		else {
			com.metier.Admin admin = (com.metier.Admin) obj;
			if (null == this.getIdUser() || null == admin.getIdUser()) return false;
			else return (this.getIdUser().equals(admin.getIdUser()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getIdUser()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getIdUser().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}